from gameset.phoenicia.base import *

from .agriculture import *
from .leisure import *
from .industry import *
from .infrastructure import *


class Cornucopia(StorageBuilding):
    name    =_ ('Cornucopia')
    color   =_ (Black)
    staff   =_ (1)
    size    =_ (2)
    creates =_ (None)
    
    @property
    def stores(self):
        return [good(1000) for good in self.creates]
    
    def construction(self):
        self.city.workers += 1000
    
    def day(self, day, month, year):
        for good in self.creates:
            self.create(good(100))
        
        super(Cornucopia, self).day(day, month, year)


class OreCornucopia(Cornucopia):
    name    =_ ('Cornucopia (Ore)')
    creates =_ (TinOre, CopperOre)


class FineOreCornucopia(Cornucopia):
    name    =_ ('Cornucopia (Fine Ore)')
    creates =_ (SilverOre, GoldOre)


class TeaCoffeeCornucopia(Cornucopia):
    name    =_ ('Cornucopia (Tea & Coffee)')
    creates =_ (TeaLeaves, CoffeeBeans)


class SugarCornucopia(Cornucopia):
    name    =_ ('Cornucopia (Sugar)')
    creates =_ ([Sugar])


class SaltCornucopia(Cornucopia):
    name    =_ ('Cornucopia (Salt)')
    creates =_ ([Salt])


class SilkCornucopia(Cornucopia):
    name    =_ ('Cornucopia (Silk)')
    creates =_ ([Silk])
